<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="../js/jquery.js"></script>
<script>
	$(document).ready(function(){
		$("#load").click(function(){
			$("#text").load("text.txt",function(responseTxt,statusTxt,xhr){
				if(statusTxt="success"){
					alert("Load AJAX data successfully.");
				}else if(statusTxt="error") {
					alert("Error: " + xhr.status + ": " + xhr.statusText);
				}
			});
		});
	});
</script>
<title>AJAX Load</title>
</head>
<body>
<h3 id="text">Click button to change this text</h3>
<button id="load" type="button">Get </button>
</body>
</html>